this._parentalControlsManager.connect('app-filter-changed',
() => this._updateFavorites());
+ this._appSystem = Shell.AppSystem.get_default();
+ this._appSystem.connect('installed-changed',
+ () => this._updateFavorites());
+
this.FAVORITE_APPS_KEY = 'favorite-apps';
this._favorites = {};
global.settings.connect(`changed::${this.FAVORITE_APPS_KEY}`,
reload() {
const ids = global.settings.get_strv(this.FAVORITE_APPS_KEY);
- const appSys = Shell.AppSystem.get_default();
- const apps = ids.map(id => appSys.lookup_app(id))
+ const apps = ids.map(id => this._appSystem.lookup_app(id))
.filter(app => app !== null && this._parentalControlsManager.shouldShowApp(app.app_info));
this._favorites = {};
for (let i = 0; i < apps.length; i++) {
this._appSystem = Shell.AppSystem.get_default();
- this._appSystem.connect('installed-changed', () => {
- AppFavorites.getAppFavorites().reload();
- this._queueRedisplay();
- });
+ this._appSystem.connect('installed-changed', () => this._queueRedisplay());
AppFavorites.getAppFavorites().connect('changed', this._queueRedisplay.bind(this));
this._appSystem.connect('app-state-changed', this._queueRedisplay.bind(this));